package com.java1234;

import com.java1234.rocketmq.OrderlyProducerService;
import com.java1234.rocketmq.ProducerService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author java1234_小锋
 * @site www.java1234.com
 * @company 南通小锋网络科技有限公司
 * @create 2021-09-05 11:53
 */
@SpringBootApplication
public class RocketmqProducerApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(RocketmqProducerApplication.class, args);
        //ProducerService producerService = (ProducerService) run.getBean("producerService");
        OrderlyProducerService producerService = (OrderlyProducerService) run.getBean("orderlyProducerService");
        //producerService.sendDelayMessage();
        //producerService.sendMessageWithTag();
        producerService.sendTransactionMessage();
    }
}
